﻿using UnityEngine;
using System.Collections;
public class FGameModel{
	static private IGameModel gameModel = null;
	static public IGameModel getModel(){
		return gameModel;
	}
	static public IGameModel Create(){
		if (gameModel == null) {
			GameObject modelobj = new GameObject ("Model");
			IGameModel model = modelobj.AddComponent (typeof(BaseModel)) as IGameModel;
			model.Init();
			GameObject.DontDestroyOnLoad(modelobj);
		}
		return gameModel;
	}
}
public interface IGameModel{
	/// <summary>
	/// 初始化只允许初始化自身内部数据
	/// </summary>
	void Init();
}
